<?php
/*
 * @ https://EasyToYou.eu - IonCube v11 Decoder Online
 * @ PHP 7.2 & 7.3
 * @ Decoder version: 1.1.6
 * @ Release: 10/08/2022
 */

// Decoded file for php version 71.
namespace AlibabaCloud\Client\Resolver;

abstract class VersionResolver
{
    public static function __callStatic($name, $arguments)
    {
        return (new static())->__call($name, $arguments);
    }
    public function __call($version, $arguments)
    {
        $version = ucfirst($version);
        $product = $this->getProductName();
        $position = strpos($product, "Version");
        if($position !== false && $position !== 0) {
            $product = str_replace("Version", "", $product);
        }
        $class = "AlibabaCloud\\" . $product . "\\" . $version . "\\" . $product . "ApiResolver";
        if(class_exists($class)) {
            return new $class();
        }
        throw new \AlibabaCloud\Client\Exception\ClientException($product . " Versions contains no " . $version, "SDK.VersionNotFound");
    }
    private function getProductName()
    {
        $array = explode("\\", get_class($this));
        if(isset($array[1])) {
            return $array[1];
        }
        throw new \AlibabaCloud\Client\Exception\ClientException("Service name not found.", "SDK.ServiceNotFound");
    }
}

?>